package com.comleader.ldmapdownload.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Classname: SettingController
 * @Description: TODO
 * @Author 张志航
 * @Date 2020/6/1
 * @Version V1.0
 */
@Controller
@RequestMapping
public class SettingController {

    @Value("${file.mapImgPath}")
    private String mapImgPath;

    @RequestMapping("/setting")
    public String setting(){
        return "settingIndex.html";
    }


    @RequestMapping("/saveSetting")
    @ResponseBody
    public String saveSetting(String mapPath){
        System.out.println(mapPath);
        if (!StringUtils.isEmpty(mapPath)){

        }
        return "settingIndex.html";
    }

    @RequestMapping("/getMapPath")
    @ResponseBody
    public String getMapPath(){
        return mapImgPath;
    }

    @RequestMapping("/test")
    public String testMap(){
        return "testMap.html";
    }

//    @RequestMapping("/api")
//    public String api(){
//        return "indexApi.html";
//    }
}
